
import 'package:flutter/services.dart';

class WinnerScanPluge {
  static const MethodChannel _channel = MethodChannel('winner_scan_pluge_register');
  static const EventChannel _eventChannel = EventChannel('winner_scan_pluge_get');

  static Future<bool?>  registerBroadcastReceiver() async {
    final bool? result = await _channel.invokeMethod('register');
    return result;
  }

  static void onListenStreamData(onEvent, onError) {
    _eventChannel.receiveBroadcastStream().listen(onEvent, onError: onError);
  }
}
